<?php
/* @var $this CallbackController */
/* @var $model Callback */
/* @var $form CActiveForm */
?>

<div class="wide form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'action'=>Yii::app()->createUrl($this->route),
	'method'=>'get',
)); ?>

	<div class="row">
		<?php echo $form->label($model,'sr_number'); ?>
		<?php echo $form->textField($model,'sr_number',array('size'=>10,'maxlength'=>10)); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'date'); ?>
		<?php
			$now = new DateTime("tomorrow");
		
			$this->widget('zii.widgets.jui.CJuiDatePicker', array(
				'model' => $model,
				'attribute' => 'date',
				'themeUrl' => Yii::app()->baseUrl . '/css/jui',
				'theme' => 'start',
				'cssFile' => 'jquery-ui-1.10.3.custom.css',		
				 'options' => array(
						'showOn' => 'both',             // also opens with a button
						'dateFormat' => 'yy-mm-dd',     // format of "2012-12-25"
						'showOtherMonths' => true,      // show dates in other months
						//'selectOtherMonths' => true,    // can select dates in other months
						//'changeYear' => true,           // can change year
						//'changeMonth' => true,          // can change month
						'yearRange' => '2013:2020',     // range of year
						'minDate' => '2013-01-01',    // minimum date
						'maxDate' => '2020-12-31',      // maximum date
						//'showButtonPanel' => true,      // show button panel
					),				
				'htmlOptions' => array(
					'size' => '10',        
					'maxlength' => '10',  
				),
			));				
		?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'idqshift'); ?>
		<?php echo $form->dropDownList($model,'idqshift',
									   CHtml::listData(Qshift::model()->findAll(array('condition'=>'team_id = '.Yii::app()->user->team_id.' and enabled = 1', 'order'=>'start_time ASC')),
													   'idqshift', 
													   'name'),	
										array('empty'=>'','class'=>'dropshift'));?>		
	</div>

	<div class="row">
		<?php echo $form->label($model,'time'); ?>
		<?php $this->widget( 'ext.EJuiTimePicker.EJuiTimePicker', array(
		  'model' => $model, 
		  'attribute' => 'time',
		  'options' => array(
				'timeOnly' => true,
				'stepMinute' => '5',
		  ),
		  
		  'htmlOptions'=>array(
				'size'=>'8',
		  ),
		  
		)); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'isAssigned'); ?>
		<?php echo $form->dropDownList($model, 'isAssigned',
										array('1'=>'Yes',
											  '0'=>'No',
											  ),
										array('empty'=>'','class'=>'dropbinary'));?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'created_by'); ?>
		<?php echo $form->dropDownList($model,'created_by',
									   CHtml::listData(User::model()->findAll(array('condition'=>'team = '.Yii::app()->user->team_id, 'order'=>'username ASC')),
													   'iduser', 
													   'username'),	
										array('empty'=>'','class'=>'dropshift'));?>		
	</div>

	<div class="row">
		<?php echo $form->label($model,'new_owner'); ?>
		<?php echo $form->dropDownList($model,'new_owner',
									   CHtml::listData(User::model()->findAll(array('condition'=>'team = '.Yii::app()->user->team_id, 'order'=>'username ASC')),
													   'iduser', 
													   'username'),	
										array('empty'=>'','class'=>'dropshift'));?>		
	</div>


	<div class="buttons">
		<br>
		<?php echo CHtml::submitButton('Search'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- search-form -->